﻿<%@ Page Title="" Language="C#" MasterPageFile="~/provider/CarInsurance/Liberty_CarInsurance.master" AutoEventWireup="true" 
 EnableEventValidation="false" CodeFile="RenewalProposalDownLoad.aspx.cs" Inherits="provider_ProposalForm_RenewalProposalDownLoad" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="provider_inner">
  
        <h1>Renewal Proposal Form Download</h1> 
        <fieldset>
            <dl>
                <dt class="top_action" style="width:100px;">
                    <label>
                        Insurance Type :
                    </label>
                </dt>
                <dd>
                    <asp:DropDownList ID="ddlInsuranceType" runat="server">
                        <asp:ListItem Value="CI">Car Insurance</asp:ListItem>
                    </asp:DropDownList>
                </dd>
            </dl>
        </fieldset>
        <fieldset>
            <dl>
                <dt class="top_action" style="width:100px;">
                    <label>
                        Posted Date :
                    </label>
                </dt>
                <dd>
                    <asp:DropDownList ID="ddlReportType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlReportType_SelectedIndexChanged">
                        <asp:ListItem Value="0">Monthly</asp:ListItem>
                        <asp:ListItem Value="1">Daily</asp:ListItem>
                        <asp:ListItem Value="2">Customize</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; 
                        <asp:Label ID="lblFromDate" runat="server"></asp:Label></b>
                    <asp:DropDownList ID="ddlDay1" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="00">All</asp:ListItem>
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth1" runat="server">
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear1" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="lblToDate" runat="server"></asp:Label>
                    <asp:DropDownList ID="ddlDay2" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="00">All</asp:ListItem>
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth2" runat="server">
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear2" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                    <div style="display: none">
                        <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
                        <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
                    </div>
                    <asp:Button ID="ImageButton1" runat="server" Text="Submit" Width="80px" OnClick="ImageButton1_Click" />
                </dd>
            </dl>
        </fieldset>
        <asp:GridView ID="grvResultViewProposal" runat="server" AllowPaging="False" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="2" CssClass="progridstyle" EmptyDataText="There are no data records to display."
            GridLines="None" DataKeyNames="PropID" OnRowDataBound="grvResultViewProposal_RowDataBound" >
            <FooterStyle />
            <PagerStyle />
            <Columns>
                <asp:BoundField DataField="PropID" HeaderText="PropID" Visible="false" InsertVisible="False"
                    ReadOnly="True" SortExpression="PropID" />
                <asp:BoundField DataField="ProposerName" HeaderText="Proposer Name" SortExpression="ProposerName" />
                <asp:BoundField DataField="PostedDate" HeaderText="Posted Date" SortExpression="PostedDate" />
                <asp:TemplateField HeaderText="Reference Number">
                    <ItemTemplate>
                        <asp:Label ID="lblReferenceNumber" runat="server" Width="100px" Text='<%# GetReferenceNumber(Eval("PropID").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Downloaded">
                    <ItemTemplate>
                        <asp:Label ID="lblIsDownload" runat="server" Width="100px" Text='<%# GetBoolValue(Eval("IsDownload").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Confirm Download">
                    <ItemTemplate>
                        <asp:Label ID="lblIsConfirmDownload" runat="server" Width="100px" Text='<%# GetBoolValue(Eval("IsConfirmDownload").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ProviderCompanyId" Visible="false" HeaderText="ProviderCompanyId"
                    SortExpression="ProviderCompanyId" />
                <asp:BoundField DataField="RefId" Visible="false" HeaderText="RefId"
                    SortExpression="RefId" />
                <asp:BoundField DataField="PremiumId" Visible="false" HeaderText="PremiumId"
                    SortExpression="PremiumId" />
                <asp:BoundField DataField="RenewalTerm" Visible="false" HeaderText="RenewalTerm"
                    SortExpression="RenewalTerm" />
                <asp:TemplateField HeaderText="Download">
                    <ItemTemplate>
                        <span class="gridbtn">
                            <asp:ImageButton ID="ibtnDownload" ImageUrl="~/images/buttons/button_download.gif"
                                CssClass="CssClassName" AlternateText="Download" runat="server" onmouseover="this.src='/images/buttons/button_download_s.gif';"
                                OnClientClick='<%# GetDownloadURl(Eval("RefId").ToString(),Eval("PremiumId").ToString(),Eval("RenewalTerm").ToString()) %>' OnClick="ConfirmDownload"
                                CommandName="Download" onmouseout="this.src='/images/buttons/button_download.gif';" />
                        </span>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <SelectedRowStyle CssClass="progridover" />
            <HeaderStyle CssClass="progridheader" />
            <EditRowStyle />
            <AlternatingRowStyle CssClass="progridodd" />
            <RowStyle CssClass="progrideven" />
        </asp:GridView> 
        <div style="display:none">
            <asp:Label ID="lblProposal" runat="server"></asp:Label>
        </div> 
        <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
            ID="ibtBack" runat="server" ImageUrl="~/Provider/images/buttons/back1.gif" OnClick="ibtBack_Click" /><input
                id="inputrefid" runat="server" type="hidden" />
    </div>

    <script type="text/javascript">
        function OpenProposal(refid) {
            document.getElementById('<%= inputrefid.ClientID%>').value = refid;

            var winl = (screen.width - 800) / 2;
            var wint = (screen.height - 500) / 2;
            var settings = 'height=500,';
            settings += 'width=800,';
            settings += 'top=' + wint + ',';
            settings += 'left=' + winl + ',';
            settings += 'scrollbars=yes,';
            settings += 'resizable=No';
            window.open('RenewalProposalForm.aspx?Ref=' + refid, 'NEWWIN', settings);
        }

    </script>

</asp:Content>

